﻿CREATE TABLE [dbo].[Building]
(
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[RowId] [uniqueidentifier] ROWGUIDCOL DEFAULT (NEWID()) NOT NULL,
	[IsDeleted] [bit] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[ModifiedDate] [datetime] NOT NULL,
	[ModifiedByUserId] [int] NULL,
	[Version] [timestamp] NOT NULL,
	[ProjectId] [int] NOT NULL,
	[Name] [nvarchar](64) NOT NULL,
	[EntrancesNumber] [smallint] NOT NULL,
	[FloorsNumber] [smallint] NOT NULL,
	[UndergroundFloorsNumber] [smallint] NOT NULL,
	[BuildingTypeId] [int] NOT NULL,
	[BuildingStateId] [int] NOT NULL,
	[BusinessTypeId] [int] NOT NULL,
)